﻿@model LeadExpress.Models.ViewPages.UserManagementModel
           
@{
    ViewBag.Title = "Báo cáo tài khoản";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<h2 class="app">
	<strong>Express - Báo cáo tài khoản</strong>
</h2>
<div class="toolbar topblue">
    <span class="area">
        <h3>Xem tài khoản</h3>
    </span>
    <a style="margin-right: 5px;" class="btn btn-exportexcel right" href='@Url.Action("ExportToExcel")'>Export to Excel</a>
</div>
<span class="paging">
    <span class="pageleft">                
        <span class="total" data-bind='text: PageText'></span>
        <span class="show">Hiển thị <input type="text" class="text" id="pagesize" data-bind='value: PageSize, attr: {maxlength: 3}, event: { keypress: RunSomethingKey }' /> trên trang <span class="smallText error-red" data-bind="text: PageSizeText"></span> </span>
    </span>
    <span class="pages">
        <span class="smallText error-red" data-bind="text: PageCurrentText"></span>Trang <input type="text" class="text" id="pagecurrent" data-bind='value: CurrentPageIndex, event: { keypress: RunSomethingKey }' /> của <span data-bind='text: MaxPageIndex' class="totalpages"></span>
        <a href="#" data-bind='click: PrevPage, attr: {class: PrevButtonClass}'>Prev </a>
  		<a href="#" data-bind='click: NextPage, attr: {class: NextButtonClass}'>Next </a>
    </span>
</span>

<div id="gridLead" class="table table-leads returnleads">
    <div class="title">
        <div class="col1" data-bind='click: function(event) { SetOrder(event, "Fullname")}'>
            <span class="w" style="height:22px">
                <a href="#">Tên</a>
                <div class="sort_wrapper" id="Fullname">  
                    <span class="grid_order ui_icon"></span>
                </div>                                        
            </span>                          
        </div>
		<div class="col1 col2" data-bind='click: function(event) { SetOrder(event, "CreationDate")}'>
            <span class="w" style="height:22px">
                <a href="#">Ngày tạo</a>
                <div class="sort_wrapper" id="CreationDate">  
                    <span class="grid_order ui_icon desc"></span>
                </div>              
            </span>
        </div>
        <div class="col1 col3" data-bind='click: function(event) { SetOrder(event, "ID")}'>
            <span class="w" style="height:22px">
                <a href="#">Mã tài khoản</a>
                <div class="sort_wrapper" id="ID">  
                    <span class="grid_order ui_icon"></span>
                </div>                                        
            </span>                          
        </div>
		<div class="col1 col4" data-bind='click: function(event) { SetOrder(event, "FirstName")}'>
            <span class="w" style="height:22px">
                <a href="#">Tên trước</a>
                <div class="sort_wrapper" id="FirstName">  
                    <span class="grid_order ui_icon"></span>
                </div>              
            </span>
        </div>
		<div class="col1 col5" data-bind='click: function(event) { SetOrder(event, "LastName")}'>
            <span class="w" style="height:22px">
                <a href="#">Tên sau</a>
                <div class="sort_wrapper" id="LastName">  
                    <span class="grid_order ui_icon"></span>
                </div>              
            </span>
        </div>
		<div class="col1 col6" data-bind='click: function(event) { SetOrder(event, "Email")}'>
            <span class="w" style="height:22px">
                <a href="#">E-mail</a>
                <div class="sort_wrapper" id="Email">  
                    <span class="grid_order ui_icon"></span>
                </div>              
            </span>
        </div>
    </div>
    <div class="linegroup" data-bind="foreach: Accounts">
        <div class="line">                        
			<div class="col1"><span class="w" style="min-height: 24px;" data-bind='text: Fullname'></span></div>
			<div class="col1 col2"><span class="w" style="min-height: 24px;" data-bind="text: CreationDate"></span></div>
			<div class="col1 col3"><span class="w" style="min-height: 24px;" data-bind='text: ID'></span></div>
			<div class="col1 col4"><span class="w" style="min-height: 24px;" data-bind='text: FirstName'></span></div>
			<div class="col1 col5"><span class="w" style="min-height: 24px;" data-bind='text: LastName'></span></div>
			<div class="col1 col6"><span class="w" style="min-height: 24px;" data-bind='text: Email'></span></div>
			
        </div>
    </div>
</div>         
@Html.Partial("_PopupConfirmLocked")   
@Html.Partial("_PartialUserPreview")

<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/viewModel/accountgrid.js" type="text/javascript"></script> 